With the advent of personal computers, numerous systems for showing information on displays have been developed and marketed. Display systems allow for application programs to display textual and graphical data on computer displays. Graphics display systems in computers based on International Business Machine's type of personal computers have gone through an evolution from so-called Color Graphics Adapter (CGA) systems to Enhanced Graphics Adapter (EGA) systems to systems that are now known as Video Graphics Array (VGA) systems.
A VGA System operates in two primary video modes. The first mode is the text mode. In text mode, a program that would like to display the character "A" would write the ASCII code (a well known standard coding scheme) into the video memory of the video controller. If a certain color is associated with that letter, a code (called "attribute") representing that color would be written into the next byte location in the video memory. The video controller then rasterizes the letter and color to be output and ensures that it is in synchronization with the various signals.
The second primary mode of video generation is the graphics mode. In the graphics mode each dot or pixel associated with an image must be generated by the CPU. Hence, each dot associated with that image must be stored within the memory space of the CPU and that memory space must be written to by an applications program. Therefore, the graphics mode is slower in the generation of video signals than the text mode.
The present application is directed toward a system for improving the video generation in the graphics mode. Hence, any future reference to mode in the generation of video signals will refer to the graphics mode. Within the graphics mode there are two types of memory organizations from which video signals can be generated--the packed pixel architecture and the planar architecture.
Before there is a complete discussion about these memory organizations, the following paragraphs will describe a typical video graphics array system. A VGA system includes three basic components: (1) a video memory; (2) a VGA controller; and (3) a digital to analog converter (DAC).
The video memory typically holds the image to be displayed on the monitor or other display device. Typically, the video memory contains a plurality of planes of memory. A plane is a section of video memory whose properties are described later in this specification.
The VGA controller is responsible for generating video signals to the display device and for managing all the CPU interface signals. The video signal generation from the controller consists of reading the information in the video memory and then sending the video data to the DAC. As has been mentioned before, the controller allows the CPU interface to be used as a means to read information from and write information into the video memory.
The digital to analog converter (DAC) serves two purposes in a VGA system. First, the DAC contains an internal palette of a plurality of entries which hold color values. In known VGA systems each entry holds color values represented as RGB (red, green and blue) values. Each RGB value is represented by a plurality of bits of information. Second, the DAC contains a functionality to produce three analog signals from a specific RGB value. Based on the input value, generated by the VGA, controller the DAC will look up the corresponding entry, extract the RGB value stored in that entry, and generate three (one red, one green, and one blue) analog signals, which are then sent to the monitor.
Therefore, in a typical VGA system, the following events occur. An address is generated by the VGA controller and placed on the address lines to the video memory. Data is read out of the video memory at the address specified on the address lines. For each time unit, a pixel of information is sent out of the VGA to the DAC. The DAC accesses the internal palette, extracts the appropriate RGB value and converts it to analog signals which are then sent to the monitor or display device. These steps are repeated as long as the VGA system is in an active state.
As has been mentioned before, it has become very popular to distinguish two different types of memory organization: the packed pixel and planar. In the packed pixel memory organization, one pixel is stored in one byte of the video memory. Thus, one pixel is defined by eight bits of information. In this mode 256 (2.sup.8) different pixel values (colors) can be displayed simultaneously. As viewed from the programmer, there are no planes (see below for definition of planes) within the video memory. Hence the video memory looks like one contiguous memory space, where the first pixel on the screen is stored in the first memory address of the video memory; the second pixel at the second memory address and so on.
In the planar video memory organization, one pixel is stored in multiple planes of the video memory. Typically, a part of the pixel is stored at the same address location in each plane. All planes are present at the same CPU address. By controlling the registers of the VGA, system the CPU can simultaneously access, through memory read and write cycles, one or more planes. In the planar organization, information is normally accessed from the video memory one plane at a time.
To generate video information from the planar organization, the VGA controller generates an address to the memory, reads the information from the respective planes (bytes) and assembles the pixels from the bytes in the planes. In a typical VGA planar mode, eight pixels are defined by one byte in each plane. Bit 7 of the bytes in each plane defines pixel O; Bit 6 in the bytes of each plane defines pixel 7, and so on. The number of available planes determines the number of bits per pixel. Hence, if there are four planes, sixteen (2.sup.4) different pixel values (color) can be displayed; if there are three planes, eight (2.sup.3) colors can be generated, and so on.
It is known that within the graphics mode there are several video modes. In each of these video modes the color of a specific pixel on a screen of the monitor is determined by the RGB value stored in one of the locations within the DAC of the VGA system. After the pixel has left the VGA controller and entered the DAC, it receives the color value. Before this point, the pixel data only contains an address into the DAC, not the color value itself.
In VGA systems utilized for grayscaling and monochrome flatpanels, using LCD, gas plasma or electro-luminescent technologies, the DAC cannot directly drive the display. The DAC cannot drive these types of displays because these types of displays receive a digital signal of the grayscale information, whereas the DAC generates an analog color signal. Grayscale video information is derived from color video information upon which a grayscaling algorithm is applied. The grayscaled video information can contain any number of bits, depending on the grayscaling capabilities of the display device. One bit per pixel defines two grayscale levels: (black (0) or white (1). Two bits per pixel define four (2.sup.2) grayscale levels. Three (2.sup.3) and four (2.sup.4) bits per pixel define eight and sixteen levels respectively.
Most video modes of the VGA (modes 0 through 12 hexadecimal) are programmed in such a way that the colors stored in the DAC will have no effect on the generated image when displayed on standard monitors. That is, in these modes the DAC performs no alteration of the colors of the pixels generated by the VGA. That means that a digital display device connected directly to the digital video output of the VGA will display the same colors as an analog monitor connected to the analog output of the DAC.
However, in the packed pixel video mode, mode 13 hex, the DAC performs a significant alteration of the video stream generated by the VGA. In this mode, the internal palette in the DAC is often programmed by software applications to hold color values specific for each individual image to be displayed. Thus, in this video mode the digital value produced by the VGA is merely an address into the DAC and cannot be used by itself to drive a display device.
It is important in a video graphics array system to provide a system for ensuring that color graphics video modes are accurately displayed on a grayscaling display device. Likewise, it is important to provide a VGA system that includes a system for ensuring that a video mode that utilizes the packed pixel memory organization be accurately displayed on such non-color display devices. The system should be such that it is inexpensive, uses little power, and takes up little or no surface area on the VGA system or personal computer.